import {
  CreateDateColumn,
  UpdateDateColumn,
  DeleteDateColumn,
  Entity,
  PrimaryGeneratedColumn,
  Column,
} from 'typeorm';

@Entity()
export abstract class BaseEntity {
  @PrimaryGeneratedColumn('uuid')
  id: string;

  @CreateDateColumn({ nullable: true })
  createTime: Date;

  @UpdateDateColumn({ nullable: true })
  updateTime?: Date;

  @DeleteDateColumn({ nullable: true })
  deleteAt?: Date;

  @Column({ nullable: true, length: 100 })
  createBy: string;

  @Column({ nullable: true, length: 100 })
  updateBy: string;

  @Column({ nullable: true, length: 100 })
  deleteBy: string;
}
